﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cecbData;
namespace cecbClasses.Data_Adapters.Template
{
    public class Template
    {
        DSSEntities dataContext;
        public Template() {

            dataContext = new DSSEntities();
        }

        public List<Get_Template_Activities_Result> GetTemplateActivitiesValues(string mProjectRef)
        {
            List<Get_Template_Activities_Result> Query =
                    (from t in dataContext.Get_Template_Activities(mProjectRef)
                     select t ).ToList();

            List<Get_Template_Activities_Result> ptype_name = Query.ToList();

            return ptype_name;
        }

        public List<Get_Template_Impacts_Result> GetTemplateImpactsValues(string mProjectRef)
        {
            List<Get_Template_Impacts_Result> Query =
                    (from t in dataContext.Get_Template_Impacts("","")
                     select t).ToList();

            List<Get_Template_Impacts_Result> ptype_name = Query.ToList();

            return ptype_name;
        }


        public List<Get_Template_ActivitiesWithReference_Result> GetTemplateActivityValuesWithReference(string mProjectRef)
        {
            List<Get_Template_ActivitiesWithReference_Result> Query =
                    (from t in dataContext.Get_Template_ActivitiesWithReference("")
                     select t).ToList();

            List<Get_Template_ActivitiesWithReference_Result> ptype_name = Query.ToList();

            return ptype_name;
        }
    }
}
